package com.k7.mobile.platform.dao.impl;

import java.util.List;

import com.k7.mobile.platform.dao.IKeywordDAO;
import com.k7.mobile.platform.dataobject.KeywordDO;


public class KeywordDAOImpl extends BaseDAOImpl implements IKeywordDAO{

	@Override
	public Long add(KeywordDO keywordDO) {
		
		Object id = getSqlMapClientTemplate().insert("KEYWORD-ADD", keywordDO);
		return (Long) id;
	}
	
	@Override
	public void delete(KeywordDO keywordDO) {
		
		this.getSqlMapClientTemplate().delete("KEYWORD-DEL", keywordDO);
		
	}

	@Override
	public void update(KeywordDO keywordDO) {
		
		this.getSqlMapClientTemplate().update("KEYWORD-UPDATE", keywordDO);
		
	}

	@Override
	public List<KeywordDO> findList(KeywordDO keywordDO) {
		
		return this.executeQueryForList("FIND-KEYWORD-LIST","FIND-KEYWORD-LIST-COUNT",  keywordDO);
	}

	@Override
	public KeywordDO getKeyword(KeywordDO keywordDO) {
		return (KeywordDO) this.getSqlMapClientTemplate().queryForObject("GET-KEYWORD", keywordDO);
	}


}
